#ifndef QWORD_H
#define QWORD_H

struct QWord
{
	QWord(const int theLowFourBytes = -1, const int theHighFourBytes = -1) : lowFourBytes(theLowFourBytes), highFourBytes(theHighFourBytes)
	{
	}

	void swap()
	{
		QWord exchanged(highFourBytes, lowFourBytes);
		eightBytes = exchanged.eightBytes;
	}

	union
	{
		struct
		{
			int lowFourBytes;
			int highFourBytes;
		};
		long long eightBytes;
	};
};

struct lessLowFourBytes
{
	bool operator()(const QWord& a, const QWord& b);
};

struct lessHighFourBytes
{
	bool operator()(const QWord& a, const QWord& b);
};

struct lessEightBytes
{
	bool operator()(const QWord& a, const QWord& b);
};

struct equalLowFourBytes
{
	equalLowFourBytes(const int theX) : x(theX)
	{
	}

	bool operator()(const QWord& qword);

	unsigned int x;
};

struct equalHighFourBytes
{
	equalHighFourBytes(const int theX) : x(theX)
	{
	}

	bool operator()(const QWord& qword);

	unsigned int x;
};

#endif
